part of '../index.dart';

class FriendModel {
  int? userId;
  String? imId;
  int? status;
  String? nickname;
  String? userRemark;
  bool? inGroup;
  bool? canJoinGroup;
  String? headPortraitsUrl;
  String? micFrameUrl;
  String? headFrameUrl;
  String? userCode;
  int? gender;
  bool? online;
  String? onlineStr;
  String? activeTime;
  String? platformAuthUrl;
  String? activeTimeStr;
  String? personalSignature;
  String? about;
  dynamic roomInfo;

  FriendModel({
    this.userId,
    this.imId,
    this.status,
    this.nickname,
    this.userRemark,
    this.inGroup,
    this.canJoinGroup,
    this.headPortraitsUrl,
    this.micFrameUrl,
    this.headFrameUrl,
    this.userCode,
    this.gender,
    this.online,
    this.onlineStr,
    this.activeTime,
    this.platformAuthUrl,
    this.activeTimeStr,
    this.personalSignature,
    this.about,
    this.roomInfo,
  });

  FriendModel.fromJson(Map<String, dynamic> json) {
    userId = int.tryParse('${json['userId']}');
    imId = json['imId'];
    status = int.tryParse('${json['status']}');
    nickname = json['nickname'];
    userRemark = json['userRemark'];
    inGroup = json['inGroup'];
    canJoinGroup = json['canJoinGroup'];
    headPortraitsUrl = json['headPortraitsUrl'];
    micFrameUrl = json['micFrameUrl'];
    headFrameUrl = json['headFrameUrl'];
    userCode = json['userCode'];
    gender = int.tryParse('${json['gender']}');
    online = json['online'];
    onlineStr = json['onlineStr'];
    activeTime = json['activeTime'];
    platformAuthUrl = json['platformAuthUrl'];
    activeTimeStr = json['activeTimeStr'];
    personalSignature = json['personalSignature'];
    about = json['about'];
    roomInfo = json['roomInfo'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['userId'] = userId;
    data['imId'] = imId;
    data['status'] = status;
    data['nickname'] = nickname;
    data['userRemark'] = userRemark;
    data['inGroup'] = inGroup;
    data['canJoinGroup'] = canJoinGroup;
    data['headPortraitsUrl'] = headPortraitsUrl;
    data['micFrameUrl'] = micFrameUrl;
    data['headFrameUrl'] = headFrameUrl;
    data['userCode'] = userCode;
    data['gender'] = gender;
    data['online'] = online;
    data['onlineStr'] = onlineStr;
    data['activeTime'] = activeTime;
    data['platformAuthUrl'] = platformAuthUrl;
    data['activeTimeStr'] = activeTimeStr;
    data['personalSignature'] = personalSignature;
    data['about'] = about;
    data['roomInfo'] = roomInfo;

    return data;
  }
}
